import request from '@/config/axios'

// 分页
export const getPage = async (params: any) => {
  return await request.get({ url: `/dine/category/page`, params })
}

// 列表
export const getList = async () => {
  return await request.get({ url: `/dine/category/list` })
}

// 详情
export const getDetailById = async (id: number | string) => {
  return await request.get({ url: `/dine/category/get/` + id })
}

// 创建
export const create = async (data: any) => {
  return await request.post({ url: `/dine/category/create`, data })
}

// 修改
export const updateById = async (data: any) => {
  return await request.post({ url: `/dine/category/update`, data })
}

// 删除
export const deleteById = async (id: number | string) => {
  return await request.post({ url: `/dine/category/delete/` + id })
}
